Error Management

When a non-fatal error occurs and motion must be stopped quickly these procedure can be taken:

Axis Procedures

Step

Example Application Code

Send Stop Command for each axis.

MLAxisStop

(PipeNetwork.AXI_A1_Axis, TRUE, DEF_A1_StopDec);

Stop the Axis Motion Generator.

MLAxisMoveVel

(PipeNetwork.AXI_A1_Axis, 0.0);

Wait for Axis to be stopped.

AxisStatus := MLAxisStatus

(PipeNetwork.AXI_A1_Axis);
IF AxisStatus.11 THEN
MLAxisStop

(PipeNetwork.AXI_A1_Axis,FALSE,DEF_A1_StopDec);

Turn power off(disable) all the axes.

MLAxisPower

(PipeNetwork.AXI_A1_Axis,FALSE);

Disconnect Pipe Network from the axis.

MLCNVDisconnect

(PipeNetwork.CNV_A1);

Machine Procedures

Step

Example Application Code

Stop Command at the master block level.

MLMstRun

(PipeNetwork.MASTER, 0.0);

Wait for Master command to be stopped.

IF A1_AckState = DEF_StateErrorStop 
   AND A2_Ackstate = DEF_StateErrorStop
   AND MLBlkIsReady(PipeNetwork.MASTER)
THEN
PrintF('*** ErrorStop M1=%i ***', M1_StatusWord,0,0,0);
   M1_AckState := DEF_StateErrorStop;

  • This code is only applicable to Pipe Network applications.
    It does not work in a PLCopen application.

This procedure for error management is based on the Project Structure Guidelines described in Application Software Structure - Implementation.

See Restarting Motion with Pipe Network about restarting the motion.